<!DOCTYPE html>
<html lang="en">
<head th:insert="/admin/common/head::css"></head>
<body>
<div th:insert="/admin/common/header::header" ></div>
<!--  main  -->
<div class="container-fluid">
    <div class="row-fluid">
        <div th:insert="/admin/common/side::side" ></div>
        <!-- content -->
        <div class="block">
            <div class="block-content collapse in">
                <div class="span12">
                    <form class="form-horizontal" method="post" th:action="@{/admin/design/update}">
                        <fieldset>
                            <legend>用户修改</legend>

                            <div class="control-group" th:if="${design != null}">
                                <label class="control-label" for="date01">设计id</label>
                                <div class="controls">
                                    <input readonly="readonly" required type="text" class="input-xlarge datepicker" id="id" name="id" th:value="${design!=null?design.id:''}">
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label" >毕业设计名称</label>
                                <div class="controls">
                                    <input required type="text" class="input-xlarge datepicker" id="title" name="title" th:value="${design!=null?design.title:''}">
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label" >毕业设计描述</label>
                                <div class="controls">
                                    <input required type="text" class="input-xlarge datepicker" id="detail" name="detail" th:value="${design!=null?design.detail:''}">
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label" for="endDate">最后操作时间</label>
                                <div class="controls">
                                    <input required type="date" class="input-xlarge datepicker" id="endDate" name="endDate" th:value="${design!=null? #dates.format(design.endDate, 'yyyy-MM-dd') : ''}">
                                </div>
                            </div>

                            <div class="control-group">
                                <label class="control-label" >最大人数</label>
                                <div class="controls">
                                    <input required type="text" class="input-xlarge datepicker" id="number" name="number" th:value="${design!=null?design.number:''}">
                                </div>
                            </div>

                            <div class="control-group" th:if="${design != null}">
                                <label class="control-label" for="endDate">发布人</label>
                                <div class="controls">
                                    <input readonly required type="text" class="input-xlarge datepicker" th:value="${design!=null? design.user.username:''}">
                                </div>
                            </div>

                            <div class="form-actions">
                                <button type="submit" class="btn btn-primary"  >[[ ${design!=null?'更新':'新增'} ]]</button>
                            </div>
                        </fieldset>
                    </form>

                </div>
            </div>
        </div>
        <!-- content -->
    </div>
</div>
<!--  main  -->

</body>
<div th:insert="/admin/common/footer::js" ></div>

</html>